package blueBridge;

/*

                    a                       b
                   / \                     / \
                  a   b
                 / \   /\
                a   b  a b


 */

public class Main703 {
    int count;
    
    
    private void dfs(int wine, int flowersVisited, int storeVisited) {
        if (wine == 1 && flowersVisited == 9 && storeVisited == 5) {
            count++;
        }
        if (storeVisited < 5) {
            dfs(wine * 2, flowersVisited, storeVisited + 1);
        }
        if (flowersVisited < 10 && wine > 1) {
            dfs(wine - 1, flowersVisited + 1, storeVisited);
        }
        
    }

    public static void main(String[] args) {
        Main703 main = new Main703();
        main.dfs(2, 0, 0);
        System.out.println(main.count);

    }
}
